import request from '@/api/index'

// 获取授权Url
export function getAuthorizeUrl(type) {
  return request({
    url: '/user/auth/authorizeUrl',
    params: { type },
    method: 'get'
  })
}

// 登录接口
export function authLogin(type, data) {
  return request({
    url: '/user/auth/login',
    method: 'post',
    params: { type },
    data
  })
}

// 绑定
export function bindLogin(type, data) {
  return request({
    url: '/user/auth/bind',
    method: 'post',
    params: { type },
    data
  })
}

// 获取用户登录信息
export function getBindAccountList() {
  return request({
    url: '/user/auth/bindAccountList',
    method: 'get'
  })
}

// 解除绑定
export function unBindAccount(data) {
  return request({
    url: '/user/auth/unbind',
    method: 'post',
    data
  })
}
